work around homebrew python linking issues (#1267)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Tue, 16 Apr 2024 13:35:04 +0000 (07:35 -0600)
committerGitHub <noreply@github.com>
Tue, 16 Apr 2024 13:35:04 +0000 (07:35 -0600)
* debug python brew issues

* dbg2

* dbg3

* dbg4

* insulate workflow from homebrew location.

.github/workflows/macos.yml

index 5244f87412dfc6a57aa97481fe42878a3b15e4ba..3538c98fa916deec7f3078656e450d1e5c1d4b06 100644 (file)
@@ -73,6 +73,12 @@ jobs:
         # https://github.com/actions/runner-images/issues/6507
         # https://github.com/actions/runner-images/issues/2322
         # brew update # skip update for now to avoid link issues AND many slow dependency upGRADES.
+        brew list -1 | grep python
+        ls -l $(brew --prefix)/bin | grep -i python
+        # workaround for https://github.com/actions/setup-python/issues/577
+        brew list -1 | grep python | while read formula; do brew unlink $formula; brew link --overwrite $formula; done
+        brew list -1 | grep python
+        ls -l $(brew --prefix)/bin | grep -i python
         brew install ninja
         brew install docbook docbook-xsl fop gnu-sed
         # brew install is taking forever on macos-11, skip jing-trang and all it's dependencies.